﻿<%@ Control Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:FormPanel ID="TourInfoForm" runat="server" Border="false" Url="/TourProgram/SaveTourInfo/"
    LabelWidth="130">
    <Items>
        <ext:Container ID="TourInfoFormContainer" runat="server" Flex="1">
            <Items>
                <ext:Hidden ID="IDOwnCompany" runat="server" />
                <ext:ComboBox ID="OwnCompanyName" runat="server" StoreID="dsCompany" Editable="true"
                    FieldLabel="Travel Agency" DisplayField="Name" ValueField="Name" TypeAhead="true"
                    Mode="Local" ForceSelection="true" Width="300" TriggerAction="All" 
                    SelectOnFocus="true">
                    <Listeners>
                        <Select Handler="generateTourCode(#{OwnCompanyName}, #{TourCode});" />
                    </Listeners>
                </ext:ComboBox>
                <ext:TextField ID="TourCode" runat="server" FieldLabel="TourCode" Width="300" />
                <ext:NumberField ID="GuestNum" runat="server" EnableKeyEvents="true" FieldLabel="Guest Num"
                    Width="300" DecimalPrecision="2" DecimalSeparator="." MaxLength="10" InvalidText="Limit is required"
                    AllowBlank="true">
                </ext:NumberField>
                <ext:NumberField ID="RoomNum" runat="server" EnableKeyEvents="true" FieldLabel="RoomNum"
                    Width="300" DecimalPrecision="2" DecimalSeparator="." MaxLength="10" InvalidText="Limit is required"
                    AllowBlank="true">
                </ext:NumberField>
                <ext:DateField ID="StartDate" runat="server" FieldLabel="Start Date" Width="300" Format="dd-MM-yyyy" />
                <ext:DateField ID="EndDate" runat="server" FieldLabel="End Date" Width="300" Format="dd-MM-yyyy" />
                <ext:Hidden ID="IDNationality" runat="server" />
                <ext:ComboBox ID="NationalityName" runat="server" StoreID="dsNationality" Editable="true"
                    FieldLabel="Nationality" DisplayField="Name" ValueField="Name" TypeAhead="true"
                    Mode="Local" ForceSelection="true" Width="300" TriggerAction="All" 
                    SelectOnFocus="true">
                </ext:ComboBox>
                <ext:Hidden ID="IDBroker" runat="server" />
                <ext:ComboBox ID="BrokerName" runat="server" StoreID="dsBroker" Editable="true"
                    FieldLabel="Sales" DisplayField="Name" ValueField="Name" TypeAhead="true" Mode="Local"
                    ForceSelection="true" Width="300" TriggerAction="All" 
                    SelectOnFocus="true">
                </ext:ComboBox>
                <ext:Hidden ID="IDLanguage" runat="server" />
                <ext:ComboBox ID="LanguageName" runat="server" StoreID="dsLanguage" Editable="true"
                    FieldLabel="Language" DisplayField="Name" ValueField="Name" TypeAhead="true"
                    Mode="Local" ForceSelection="true" Width="300" TriggerAction="All" 
                    SelectOnFocus="true">
                </ext:ComboBox>
                    
                <ext:DateField ID="CreatedDate" runat="server" FieldLabel="CreatedDate" Width="300" Format="dd-MM-yyyy" />

            </Items>
        </ext:Container>
    </Items>
    <BaseParams>
        <ext:Parameter Name="IDTour" Value='<%# ViewData["IDTour"] %>' Mode="Value" AutoDataBind="true" />
    </BaseParams>
</ext:FormPanel>
